import http from '@/api/index'
import type { Result , page,FlowInfo} from '@/api/dataType'

/**
 * 查询所有流程信息
 * @param id
 */
export const getAllFlowInfo = () => {
    return http.get<FlowInfo>(`/flowInfo`)
}
 
/**
 * 分页查询流程信息
 * @param id
 */
export const getFlowInfoPage = (val:page) => {
    return http.get<FlowInfo>(`/flowInfo/page`,val)
} 

/**
 * 根据id查询流程信息
 * @param id
 */
export const getFlowInfoById = (val:number) => {
    return http.get<FlowInfo>(`/flowInfo/` + val)
} 

/**
 * 删除流程信息
 * @param id
 */
export const deleteFlowInfo = (val:number) => {
    return http.delete<FlowInfo>(`/flowInfo/` + val)
}

/**
 * 新增流程信息
 * @param id
 */
export const addFlowInfo = (val:object) => {
    return http.post<FlowInfo>(`/flowInfo`,val)
}

/**
 * 修改流程信息
 * @param id
 */
export const updateFlowInfo = (val:object) => {
    return http.put<FlowInfo>(`/flowInfo` ,val)
}